<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="template/base.jsp" %>
<%@ taglib prefix="k" uri="http://www.kaishengit.com/tag" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>凯盛项目管理系统</title>
		<link rel="stylesheet" type="text/css"
			href="${basePath}/style/index.css" media="all" />
		<script type="text/javascript" src="${basePath }/script/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		
		
	});
</script>
	</head>
	<body>
		<div id="body-wrapper"> 
		
		<div id="sidebar">
			<%@ include file="template/left.jsp" %>
		</div> <!-- End #sidebar -->
		<!-- 右边 -->
		
		<div id="main-content">
		
			<div class="content-box">
				<div class="nav">
					<a href="${basePath}/main.action">首页</a> > <a href="project!list.action?id=${issues.project.id}">${issues.project.projectname}</a>>
					<c:choose>
								<c:when test="${issues.type == 1 }">
									任务
								</c:when>
								<c:when test="${issues.type == 2 }">
									错误
								</c:when>
								<c:when test="${issues.type == 3 }">
									想法
								</c:when>
							</c:choose>
				</div>
			</div>
		
			<div class="column-left">
				<div class="content-box">
					<div class="content-box-header">
						<h3 style="cursor: s-resize;">
							<c:choose>
								<c:when test="${issues.type == 1 }">
									<img src="${basePath }/images/task.png"/>${issues.title}
								</c:when>
								<c:when test="${issues.type == 2 }">
									<img src="${basePath }/images/bug.png"/>${issues.title}
								</c:when>
								<c:when test="${issues.type == 3 }">
									<img src="${basePath }/images/idea.png"/>${issues.title}
								</c:when>
							</c:choose>
						</h3>
					</div>
					<div class="content-box-content" style="padding-bottom: 10px;">
						<div style="display: block;" class="tab-content default-tab">
							${issues.content}
							<p class="msg_p">${issues.createuser.username } 更新于 ${issues.createtime}</p>
						</div>
					</div> 
				</div>
				
				<div class="content-box">
					<div class="content-box-header">
						<h3 style="cursor: s-resize;">当前讨论</h3>
					</div>
					<div class="content-box-content" style="padding-bottom: 10px;">
						<div style="display: block;" class="tab-content default-tab">
						
					<c:choose>
						<c:when test="${empty issues.talks}">
							<div class="me_message">
								
								当前还没有讨论
							</div>
						</c:when>
						<c:otherwise>	
						<c:forEach items="${issues.talks}" var="talk">
							<div class="me_message">
								<div class="pic">
									<img src="${basePath }/images/pic.jpg" width="36" height="36" />
								</div>
								${talk.content}
								<p>${talk.user.username } 更新于 ${talk.createtime}</p>
							</div>
						</c:forEach>
						</c:otherwise>
						</c:choose>
						
							
							
							<form action="issues!savetalk.action?id=${issues.id}" method="post">
								<textarea name="talk.content"></textarea>
								<input type="submit" value="参与讨论" class="button" style="margin-top:10px;"/>
							</form>
							
							
						</div>
					</div> 
				</div>
				
				
			</div>
			
			
			
			
			
			
			
			
			<div class="content-box column-right">
				
				<div class="content-box-header">
					<h3 style="cursor: s-resize;">当前状态　　<span style="color:#77BACE">${issues.state }</span></h3>
				</div>
				
				<div class="content-box-content">
					
					<div style="display: block;" class="tab-content default-tab">
						<form action="issues!changestate.action?id=${issues.id}" method="post">
							<k:issues_state name="state" state="${issues.state }"/>
							<input type="submit" class="button" value="更新"/>
						</form>
					</div>       
					
				</div> 
			</div>
			<div class="content-box column-right">
				
				<div class="content-box-header">
					<h3 style="cursor: s-resize;">任务分配
						<c:if test="${not empty issues.workuser}">
					　　		<span style="color:#77BACE">已分配给:${issues.workuser.username }</span></h3>
					    </c:if>
				</div>
				
				<div class="content-box-content">
					
					<div style="display: block;" class="tab-content default-tab">
						<form action="issues!givetask.action" method="post">
						<input type="hidden" name="id" value="${issues.id}"/>
						分配给：<select name="userid">
									<option>未选择</option>

									<c:forEach items="${issues.project.users }" var="u">
										<option value="${u.id }">${u.username }</option>
									</c:forEach>
								</select>
								<input type="submit" class="button" value="分配"/>
						</form>
					</div>       
				</div> 
			</div>
			<div class="clear"></div>
			
			<div id="footer">
				<small>
						© Copyright 2011 焦作凯盛信息技术有限公司 | Powered by <a href="http://www.kaishengit.com">凯盛软件</a> | <a href="#">Top</a>
				</small>
			</div>
			
		</div>
		
	</div>
	</body>
</html>